<?php
$var = array(4, 3, 6, 7, 9, 1, 2, 12, 8, 1, 0);
$x = 5;
$max = $var[0];
$min = $var[0];
for($i = 0; $i < count($var); $i++)
{
	if($max < $var[$i])
	{
		$max = $var[$i];
	}
	if($min > $var[$i])
	{
		$min = $var[$i];
	}
}

echo "max = $max";
echo "<br/>";
echo "min = $min";
echo "<br/>";

echo "Number with mutiplex of x over 25: ";
for($i = 0; $i < count($var); $i++)
{
	if($x*$var[$i] > 25)
	{
		echo "$var[$i], ";
	}
}

$have = false;

for($i = 0; $i < count($var); $i++)
{
	if($x == $var[$i])
	{
		$have = true;
	}
}

echo "<br/>";

if($have == true)
{
	echo "x is part of the array";
}
else {
	echo "x is not part of the array";
}

echo "<br/>";

$var2 = array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
for($i = 0; $i < count($var); $i++)
{
	$var2[$i] = $var[count($var)-$i-1];
}
for($i = 0; $i < count($var2); $i++)
{
	echo "$var2[$i] ";
}

echo "<br/>";

for($i = 0; $i < count($var); $i++)
{
	if($var[$i] % 3 == 0)
	{
		$var[$i] = 3;
		
	}
	echo "$var[$i] ";
}

echo "<br/>";
$count = 0;
foreach($var as $value)
{
	$count++;
}
echo "count: $count";
?>